{{template "header"}}
<title>{{.Topic.Title}} - 我的 beego 博客</title>
</head>

<body>
<div class="page-header">
    <div class="navbar navbar-default navbar-fixed-top">
        <div class="container">
            {{template "navbar" .}}
        </div>
    </div>

    <div class="container">
        {{$Lables := .Lables}}
        {{with .Topic}}
        <h1>{{.Title}}
            <small>{{.Category}}</small>
        </h1>
        <h5>{{range $Lables}}

            <a href="/?lable={{.}}">{{.}}</a>

            {{end}}
        </h5>
        {{.Content}}
        {{end}}
    </div>

    <div class="container">
        {{$tid := .Topic.Id}}
        {{$isLogin := .IsLogin}}
        {{range .Replies}}
        <h3>{{.Name}}
            <small>{{.Created}} {{if $isLogin}}<a href="/reply/delete?tid={{$tid}}&rid={{.Id}}">删除</a>{{end}}</small>
        </h3>
        {{.Content}}
        {{end}}
        <h3>本文回复</h3>
        <form method="post" action="/reply/add">
            <input type="hidden" name="tid" value="{{.Topic.Id}}">
            <div class="form-group">
                <label>显示昵称：</label>
                <input type="text" class="form-control" name="nickname">
            </div>

            <div class="form-group">
                <label>内容：</label>
                <textarea name="content" id="" cols="30" rows="10" class="form-control"></textarea>
            </div>
            <button class="btn btn-default" type="submit">提交回复</button>
        </form>
    </div>
</div>
<script type="text/javascript" src="http://cdn.staticfile.org/jquery/2.0.3/jquery.min.js"></script>
<script type="text/javascript" src="/static/js/bootstrap.min.js"></script>
</body>
</html>
